<include file="Public:header_login"/>

<div class="loginForm left">
    <form action="{:U('Index/doreg')}" method="post" onsubmit="return doreg();">
        <input type="text" class="lf_input" placeholder="请输入用户名" id="name" name="name" autofocus><br>
        <input type="password" class="lf_input" placeholder="请输入密码" id="pwd" name="pwd"><br>
        <input type="password" class="lf_input" placeholder="请确认密码" id="pwd1" name="pwd1"><br>
        <input type="submit" value="注册" class="lf_btn">
    </form>

</div>
<div class="loginRight right">
    <p>已有 爱玩视频 账号 </p>
    <a href="{:U('Index/login')}">直接登陆</a>
</div>

<script type="text/javascript">
    function doreg() {
        var name = $("#name").val();
        var pwd = $("#pwd").val();
        var pwd1 = $("#pwd1").val();
        if (name == "") {
            alert("请输入用户名！");
            return false;
        }
        if (pwd == "") {
            alert("请输入密码！");
            return false;
        }
        if (pwd1 == "") {
            alert("请确认密码！");
            return false;
        }
        if (pwd!=pwd1) {
            alert("确认密码错误！");
            return false;
        }

    }

</script>

<include file="Public:bottom_login"/>